package ke07.rmi.aufgabe;

import java.rmi.RemoteException;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;
import java.rmi.server.UnicastRemoteObject;


public class RMIServerUpperCase {
	
	public static void main(String[] args) throws RemoteException {
		LocateRegistry.createRegistry( Registry.REGISTRY_PORT );

	    UpperCaseImpl upperCase = new UpperCaseImpl();
	    IUpperCase stub = (IUpperCase) UnicastRemoteObject.exportObject( upperCase , 0 );

	    Registry registry = LocateRegistry.getRegistry();
	    registry.rebind( "upString", stub );

	    System.out.println( "UpperCase-Dienst angemeldet" );
	}
}
